package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.pojo.Emp;
import com.gxa.pojo.Resume;
import com.gxa.pojo.blackPojo.BlackPojo;
import io.swagger.annotations.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/quit_job")
@Api(value = "员工离职表",tags = "员工离职表接口API")
public class JobQuitController {
    //查询
    @RequestMapping(value = "/queryQuitJob",method = RequestMethod.GET)
    @ApiOperation(value = "系统用户查询接口",notes = "传递当前页码数和每页显示记录数",httpMethod = "GET", response = BlackPojo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",required = true,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "pageSize",value = "每页显示条数",required = true,dataType = "String",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
            })
    @ResponseBody
    public R findSysUserList(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize){
        R r = new R();
        r.setCode(200);
        r.setMsg("cg");
        List<BlackPojo> sysUserList = new ArrayList<>();
        BlackPojo blackPojo=new BlackPojo();
        blackPojo.setEmp_name("admin");
        blackPojo.setEmp_sex("123");
        blackPojo.setAge("55岁");
        blackPojo.setEmp_education(1);
        blackPojo.setEmp_phone("19905059595");
        blackPojo.setEmp_dept("一事业部");
        blackPojo.setEmp_jionpic("src/img2");
        blackPojo.setEmp_idcard("123456");
        blackPojo.setEmp_quitpic("src/img3");
        blackPojo.setEmp_jionpic("src/img4");
        blackPojo.setSelf_pic("src/img1");
        BlackPojo blackPojo02=new BlackPojo();
        blackPojo02.setEmp_name("admin");
        blackPojo02.setEmp_sex("123");
        blackPojo02.setAge("55岁");
        blackPojo02.setEmp_education(1);
        blackPojo02.setEmp_phone("19905059595");
        blackPojo02.setEmp_dept("一事业部");
        blackPojo02.setEmp_jionpic("src/img2");
        blackPojo02.setEmp_idcard("123456");
        blackPojo02.setEmp_quitpic("src/img3");
        blackPojo02.setEmp_jionpic("src/img4");
        blackPojo02.setSelf_pic("src/img1");
        sysUserList.add(blackPojo);
        sysUserList.add(blackPojo02);
        r.setData(sysUserList);
        return r;
    }

    @RequestMapping(value = "/shielding",method = RequestMethod.GET)
    @ApiOperation(value = "拉黑操作",notes = "传递身份证号码",httpMethod = "GET", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "emp_IdCard",value = "身份证号码",required = true,dataType = "String",paramType = "query"),
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R shieldingEmp(){
        R r=new R();
        r.setCode(200);
        r.setMsg("拉黑成功");
        return r;

    }


    @RequestMapping(value = "/editEmp",method = RequestMethod.GET)
    @ApiOperation(value = "编辑操作",notes = "传递身份证号码",httpMethod = "GET", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "emp_IdCard",value = "身份证号码",required = true,dataType = "String",paramType = "query"),
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R editEmp(String idCard){
        R r = new R();
        r.setCode(200);
        r.setMsg("success");
        List<BlackPojo> sysUserList = new ArrayList<>();
        BlackPojo blackPojo=new BlackPojo();
        BlackPojo blackPojo01=new BlackPojo();
        blackPojo01.setEmp_name("admin");
        blackPojo01.setEmp_sex("123");
        blackPojo01.setAge("55岁");
        blackPojo01.setEmp_education(1);
        blackPojo01.setEmp_phone("19905059595");
        blackPojo01.setEmp_dept("一事业部");
        blackPojo01.setEmp_jionpic("src/img2");
        blackPojo01.setEmp_idcard("123456");
        blackPojo01.setEmp_quitpic("src/img3");
        blackPojo01.setEmp_jionpic("src/img4");
        blackPojo01.setSelf_pic("src/img1");
        BlackPojo blackPojo02=new BlackPojo();
        blackPojo02.setEmp_name("admin");
        blackPojo02.setEmp_sex("123");
        blackPojo02.setAge("55岁");
        blackPojo02.setEmp_education(1);
        blackPojo02.setEmp_phone("19905059595");
        blackPojo02.setEmp_dept("一事业部");
        blackPojo02.setEmp_jionpic("src/img2");
        blackPojo02.setEmp_idcard("123456");
        blackPojo02.setEmp_quitpic("src/img3");
        blackPojo02.setEmp_jionpic("src/img4");
        blackPojo02.setSelf_pic("src/img1");
        sysUserList.add(blackPojo);
        sysUserList.add(blackPojo02);
        r.setData(sysUserList);
        return r;
    }



    @RequestMapping(value = "/deleteEmp",method = RequestMethod.GET)
    @ApiOperation(value = "删除操作",notes = "传递身份证号码",httpMethod = "GET", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "emp_IdCard",value = "身份证号码",required = true,dataType = "String",paramType = "query"),
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R deleteEmp(String idCard){
        R r=new R();
        r.setCode(200);
        r.setMsg("删除成功");
        return r;
    }

    @RequestMapping(value = "/deleteAllEmp",method = RequestMethod.GET)
    @ApiOperation(value = "批量删除操作",notes = "传递身份证号码",httpMethod = "GET", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "emp_IdCard",value = "身份证号码",required = true,dataType = "list",paramType = "query"),
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R empAllDelete(String idCard){
        R r=new R();
        r.setCode(200);
        r.setMsg("批量删除成功");
        return r;
    }

    @RequestMapping(value = "/wordSelect",method = RequestMethod.GET)
    @ApiOperation(value = "关键词搜索",notes = "传递字符串",httpMethod = "GET", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "word",value = "关键词",required = true,dataType = "String",paramType = "query"),
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R select_Word(String word){
        R r=new R();
        r.setCode(200);
        r.setMsg("成功");
        r.setData(null);
        return r;
    }


}
